package com.syh.jn.scm.domain.upstream.repository.sale;

import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.jn.scm.domain.upstream.entity.sale.UpSaleOrder;
import com.syh.jn.scm.domain.upstream.entity.sale.UpSaleOrderItem;
import com.syh.jn.scm.dto.upstream.sale.UpSaleOrderItemVo;

import java.util.List;

public interface UpSaleOrderRepository extends UpSaleOrderReadRepository,AggregateRepository<UpSaleOrder, Long> {

  /**
   * 根据id查出明细
   *
   * @param id
   * @return
   */
  List<UpSaleOrderItem> getItemsByOrderId(Long id);
  /**
   * 修改订单
   *
   * @param updateItems
   */
  public void update(UpSaleOrder saleOrder, boolean updateItems);

  /**
   * 上传单据图片
   * @param order
   */
  public void upload(UpSaleOrder order);

  /**
   * 更新订单及订单项
   *
   * @param order
   */
  public void updateOrderAndItems(UpSaleOrder order);

}
